<?php
class SaveAccount {
	public function saveAccount($username, $password, $email) {
		//Clean up data
		$username = $this->_db->escape($username);
		$password = $this->_db->escape($password);
		$email = $this->_db->escape($email);

		//Set up mysqli instance
		$dbconn = mysqli('localhost',
				'root',
				'');

		$dbconn->select_db('zend');

		//Create the SQL statement and insert
		$statement="INSERT INTO Accounts(username, password, email)
				VALUES('".$username."',
					'".$password."',
					'".$email."')";
		
		$dbconn->query($statement);

		$dbconn->close();
	}
}